SharePoint
Seamlessly ingest documents, policies, and pages from your SharePoint sites into the Knowledge Repository.
This connector allows SVAHNAR to read and consolidate content from SharePoint site libraries and pages, making them searchable and usable by your AI agents.
💡 Core Concepts
To configure this tool, you need to understand the underlying authentication mechanism.
1. How does the SharePoint Connector work?
The connector uses an Azure AD Application (Service Principal) to authenticate with Microsoft Graph. It acts as a read-only "user" that scans your specified site URL, downloads compatible files (PDFs, Docs, Pages), and normalizes them for the Knowledge Repository.
2. Prerequisites
- Admin Access: You (or your IT admin) need access to the Azure Portal to register an application.
- Permissions: The application requires
Sites.Read.Allpermissions to fetch content.
⚙️ Configuration Steps
Follow these steps to register your application and locate the required credentials.
Register Azure App
- Log in to the Azure Portal.
- Navigate to Azure Active Directory > App registrations > New registration.
- Name: Enter a name (e.g.,
svahnar-knowledge-importer). - Supported account types: Select "Accounts in this organizational directory only" (Single tenant).
- Click Register.
Get IDs & Create Secret
-
Get Client & Tenant IDs:
- On the App Overview page, copy the Application (client) ID.
- Copy the Directory (tenant) ID.
-
Generate Client Secret:
- Go to Certificates & secrets in the left sidebar.
- Click New client secret.
- Add a description and expiry, then click Add.
- Crucial: Copy the Value immediately. You will not be able to see it again.
Grant Permissions
- Go to API permissions in the sidebar.
- Click Add a permission > Microsoft Graph.
- Select Application permissions (NOT Delegated).
- Search for and check
Sites.Read.All. - Click Add permissions.
- Important: Click the "Grant admin consent for [Your Org]" button to finalize access.
Configure Connector
-
Locate Site URL:
- Navigate to your SharePoint site in a browser.
- Copy the full URL (e.g.,
https://contoso.sharepoint.com/sites/Engineering).
-
Input Credentials:
- Use the
tenant_id,client_id,client_secret, andsite_urlgathered in previous steps to configure the connector payload.
- Use the
📚 Practical Recipes
Recipe 1: Standard Connector Payload
Use Case: Connecting a specific engineering team site to the repository.
{
"tenant_id": "b348d660-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"client_id": "f8a7e221-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"client_secret": "VGhpcyBpcyBhIHNhbXBsZSBzZWNyZXQgd2hpY2ggaXMgdmVyeSBzZWN1cmU=",
"site_url": "https://yourtenant.sharepoint.com/sites/Engineering"
}
Treat your client_secret like a password. Ensure it is stored securely and never exposed in public repositories.
🚑 Troubleshooting
-
401/403 Access Denied Errors
- Verify that you clicked "Grant admin consent" in the Azure Portal API Permissions tab.
- Ensure you selected Application permissions, not Delegated permissions.
- Check if your
client_secrethas expired.
-
Missing Files or Pages
- Verify the
site_urlis correct. If you need a sub-site, ensure the URL includes the full path. - Some complex web parts or custom scripts on SharePoint pages may not translate perfectly to text.
- Large binary attachments may be skipped depending on your repository ingestion limits.
- Verify the
-
Throttling
- Microsoft Graph APIs enforce rate limits. If you are importing a massive library, the connector may need to back off and retry. Monitor the logs for throttling warnings.